package burubaka.model;

import java.io.Serializable;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.Model;
import org.slim3.datastore.json.Json;

import com.google.appengine.api.datastore.Key;

@Model(schemaVersion = 1)
public class PayOff implements Serializable {

	private static final long serialVersionUID = 1L;

	@Attribute(primaryKey = true, json = @Json(ignore = true))
	private Key key;

	@Attribute(version = true, json = @Json(ignore = true))
	private Long version;

	private String winNo;// 単勝
	private long win;// 単勝
	private String place1No;// 複勝1
	private long place1;// 複勝1
	private String place2No;// 複勝2
	private long place2;// 複勝2
	private String place3No;// 複勝3
	private long place3;// 複勝3
	private String bracketQuinellaNo;// 枠連
	private long bracketQuinella;// 枠連
	private String quinellaNo;// 馬連
	private long quinella;// 馬連
	private String exactaNo;// 馬単
	private long exacta;// 馬単
	private String trioNo;// 3連複
	private long trio;// 3連複
	private String trifectaNo;// 3連単
	private long trifecta;// 3連単
	private String quinellaPlace1No;// ワイド1
	private long quinellaPlace1;// ワイド1
	private String quinellaPlace2No;// ワイド2
	private long quinellaPlace2;// ワイド2
	private String quinellaPlace3No;// ワイド3
	private long quinellaPlace3;// ワイド3
	private String bracketExactaNo;// 枠単
	private long bracketExacta;// 枠単

	/**
	 * Returns the key.
	 * 
	 * @return the key
	 */
	public Key getKey() {
		return key;
	}

	/**
	 * Sets the key.
	 * 
	 * @param key
	 *            the key
	 */
	public void setKey(Key key) {
		this.key = key;
	}

	/**
	 * Returns the version.
	 * 
	 * @return the version
	 */
	public Long getVersion() {
		return version;
	}

	/**
	 * Sets the version.
	 * 
	 * @param version
	 *            the version
	 */
	public void setVersion(Long version) {
		this.version = version;
	}

	public long getWin() {
		return win;
	}

	public void setWin(long win) {
		this.win = win;
	}

	public String getWinNo() {
		return winNo;
	}

	public void setWinNo(String winNo) {
		this.winNo = winNo;
	}

	public long getBracketQuinella() {
		return bracketQuinella;
	}

	public void setBracketQuinella(long bracketQuinella) {
		this.bracketQuinella = bracketQuinella;
	}

	public String getBracketQuinellaNo() {
		return bracketQuinellaNo;
	}

	public void setBracketQuinellaNo(String bracketQuinellaNo) {
		this.bracketQuinellaNo = bracketQuinellaNo;
	}

	public long getBracketExacta() {
		return bracketExacta;
	}

	public void setBracketExacta(long bracketExacta) {
		this.bracketExacta = bracketExacta;
	}

	public String getBracketExactaNo() {
		return bracketExactaNo;
	}

	public void setBracketExactaNo(String bracketExactaNo) {
		this.bracketExactaNo = bracketExactaNo;
	}

	public long getQuinella() {
		return quinella;
	}

	public void setQuinella(long quinella) {
		this.quinella = quinella;
	}

	public String getQuinellaNo() {
		return quinellaNo;
	}

	public void setQuinellaNo(String quinellaNo) {
		this.quinellaNo = quinellaNo;
	}

	public long getExacta() {
		return exacta;
	}

	public void setExacta(long exacta) {
		this.exacta = exacta;
	}

	public String getExactaNo() {
		return exactaNo;
	}

	public void setExactaNo(String exactaNo) {
		this.exactaNo = exactaNo;
	}

	public long getTrio() {
		return trio;
	}

	public void setTrio(long trio) {
		this.trio = trio;
	}

	public String getTrioNo() {
		return trioNo;
	}

	public void setTrioNo(String trioNo) {
		this.trioNo = trioNo;
	}

	public long getTrifecta() {
		return trifecta;
	}

	public void setTrifecta(long trifecta) {
		this.trifecta = trifecta;
	}

	public String getTrifectaNo() {
		return trifectaNo;
	}

	public void setTrifectaNo(String trifectaNo) {
		this.trifectaNo = trifectaNo;
	}

	public long getPlace1() {
		return place1;
	}

	public void setPlace1(long place1) {
		this.place1 = place1;
	}

	public String getPlace1No() {
		return place1No;
	}

	public void setPlace1No(String place1No) {
		this.place1No = place1No;
	}

	public long getPlace2() {
		return place2;
	}

	public void setPlace2(long place2) {
		this.place2 = place2;
	}

	public String getPlace2No() {
		return place2No;
	}

	public void setPlace2No(String place2No) {
		this.place2No = place2No;
	}

	public long getPlace3() {
		return place3;
	}

	public void setPlace3(long place3) {
		this.place3 = place3;
	}

	public String getPlace3No() {
		return place3No;
	}

	public void setPlace3No(String place3No) {
		this.place3No = place3No;
	}

	public long getQuinellaPlace1() {
		return quinellaPlace1;
	}

	public void setQuinellaPlace1(long quinellaPlace1) {
		this.quinellaPlace1 = quinellaPlace1;
	}

	public String getQuinellaPlace1No() {
		return quinellaPlace1No;
	}

	public void setQuinellaPlace1No(String quinellaPlace1No) {
		this.quinellaPlace1No = quinellaPlace1No;
	}

	public long getQuinellaPlace2() {
		return quinellaPlace2;
	}

	public void setQuinellaPlace2(long quinellaPlace2) {
		this.quinellaPlace2 = quinellaPlace2;
	}

	public String getQuinellaPlace2No() {
		return quinellaPlace2No;
	}

	public void setQuinellaPlace2No(String quinellaPlace2No) {
		this.quinellaPlace2No = quinellaPlace2No;
	}

	public long getQuinellaPlace3() {
		return quinellaPlace3;
	}

	public void setQuinellaPlace3(long quinellaPlace3) {
		this.quinellaPlace3 = quinellaPlace3;
	}

	public String getQuinellaPlace3No() {
		return quinellaPlace3No;
	}

	public void setQuinellaPlace3No(String quinellaPlace3No) {
		this.quinellaPlace3No = quinellaPlace3No;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((key == null) ? 0 : key.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		PayOff other = (PayOff) obj;
		if (key == null) {
			if (other.key != null) {
				return false;
			}
		} else if (!key.equals(other.key)) {
			return false;
		}
		return true;
	}
}
